# include "vd.h"

#pragma code_seg("PAGE")

NTSTATUS VD_CreateClose (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
{
    PDEVICE_EXTENSION		device_extension;
	PIO_STACK_LOCATION				io_stack;
	NTSTATUS				status;	

	io_stack = IoGetCurrentIrpStackLocation(Irp);
	
	device_extension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
    
	if (io_stack->MajorFunction == IRP_MJ_CREATE){	
		DbgPrint("Create Routine \n");
	}

	if (io_stack->MajorFunction == IRP_MJ_CLOSE)	
		DbgPrint("Close Routine \n");

	Irp->IoStatus.Status = STATUS_SUCCESS;
    Irp->IoStatus.Information = FILE_CREATED;
	if (device_extension->DeviceNumber != 0)
	DbgPrint("CreateClose RefCount %d \n", DeviceObject->ReferenceCount);

	IoCompleteRequest(Irp, IO_NO_INCREMENT);
	return STATUS_SUCCESS;
}